<script setup lang="ts">
import { useCommonStore } from '@/stores'
import { ref } from 'vue'

const commonStore = useCommonStore()
const FireCenterDetailsForm1 = ref()

// 弹框打开时的回调
const open = () => {
  // 重置添加中心表单
  FireCenterDetailsForm1.value.formRef.resetFields()
}
// 添加中心保存
const submitForm = async () => {
  await FireCenterDetailsForm1.value.formRef.validate()
  console.log('过校验了没')
}
</script>

<template>
  <div class="elDialog-page">
    <el-dialog
      @open="open"
      center
      v-model="commonStore.dialogVisibleCommon"
      title="添加中心"
    >
      <FireCenterDetailsForm
        ref="FireCenterDetailsForm1"
      ></FireCenterDetailsForm>
      <!-- <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="submitForm"> 保存 </el-button>
        </div>
      </template> -->
    </el-dialog>
  </div>
</template>

<style lang="scss" scoped></style>
